#ifndef BASELIB_BASE_LOG_H_
#define BASELIB_BASE_LOG_H_

#include <string>

enum TEXT_COLOR {
    COLOR_RED    = 0x0004 | 0x0080,
    COLOR_BLUE   = 0x0001 | 0x0080,
    COLOR_GREEN  = 0x0002 | 0x0080,
    COLOR_YELLOW = 0x0004 | 0x0002 | 0x0080,
    COLOR_WHITE 
};

typedef enum {
    ERR  =  0,
    INFO =  1,
    WARN =  2,
    GOOD =  3,
}LOG_LEVEL;

inline void SetTextColor(TEXT_COLOR color, const char* text);
inline void SetTextColor(TEXT_COLOR color, const char* fmt, ...);
inline void ShowLogMsg(LOG_LEVEL level, const char* fmt, va_list ap);
inline void GET_LOG_DATE(std::string& _date_);
inline void GET_LOG_FILE(std::string& file_path);
inline void LOG_MSG(LOG_LEVEL level,char const* _file, long _line, char const* fmt,...);
#define LOG(level,...) LOG_MSG(level, __FILE__, __LINE__, __VA_ARGS__)


#endif//BASELIB_BASE_LOG_H_